﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Metro.AxisFromSKY.Model;
using Metro.AxisFromSKY.Service;
using Microsoft.AspNetCore.Mvc;

namespace Metro.AxisFromSKY.Controllers
{
    [Route("api/[controller]")]
    public class AxisFromSkyController : Controller
    {
        private readonly AxisService _service;

        public AxisFromSkyController(AxisService service)
        {
            _service = service;
        }

        // POST api/<controller>
        [HttpPost]
        public string Post([FromBody]List<Data> AxisDataList)
        {
            var count = _service.PostDataToDB(AxisDataList);

            return $"成功传入数据{count}个";
        }

    }
}
